$(function(){

    var str = location.search;
    var id = +str.slice(4);

    $.ajax({
        url: "http://127.0.0.1:9090/api/getdiscountproduct",
        data: { productid: id},
        dataType: "json",
        success: function(result){
            console.log(result);
            $(".cu-content").html(template("temp-content",result));
        }
    });

});